Skip to content

docs: add write-feature-docs skill for documenting abs features - #281

Merged
joalves merged 1 commit into
masterfrom
feat/write-feature-docs-skill
Jul 20, 2026
Merged

docs: add write-feature-docs skill for documenting abs features#281
joalves merged 1 commit into
masterfrom
feat/write-feature-docs-skill

Conversation

@joalves

@joalves joalves commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds write-feature-docs, a skill that turns an ABsmartly feature into Docusaurus Product Documentation pages — capturing the workflow we used to document Warehouse Native (Fully vs Hybrid) so it's repeatable instead of trapped in a transcript.

It's the orchestrator half of a two-skill pair. Its companion, document-feature-capture, lives in the abs repo (separate PR) and handles codebase research + screenshots; this skill auto-invokes it.

What it does

Single entry point (/write-feature-docs <feature>) running five phases:

  1. Research — delegates to document-feature-capture (research mode) → a structured report that flags product-judgment calls the code can't settle.
  2. Confirm framing (soft gate) — surfaces flagged items (marketing terms not in code, mode distinctions, constraint meanings) via AskUserQuestion before writing. Strongly recommended, not hard-blocking.
  3. Write pages — studies sibling pages, then writes/extends .mdx matching site conventions.
  4. Screenshots — delegates to document-feature-capture (capture mode); degrades gracefully to "pages + list of owed screenshots" if the app can't be brought up.
  5. Validate — dev-server compile / anchor / broken-link / image checks.

Files

.claude/skills/write-feature-docs/
  SKILL.md
  references/docusaurus-conventions.md   # frontmatter, <Image> import (depth-sensitive), _category_.json, admonitions, anchor-slug rules, content rules
  references/validation.md               # dev-server validation loop + the known cytoscape/mermaid build quirk to ignore

Provenance / accuracy

Every convention and command is drawn from the actual Warehouse Native docs session and verified against this repo (the <Image> import-depth rule, anchor slugging, the cytoscape/mermaid build error being pre-existing and unrelated). Content rules encode the corrections the product owner made during that session: mirror the product's own labels, say "can" not "must" where the product allows a choice, and don't leak internal implementation.

Notes

  • Content + validation only — worktree/JIRA/PR stay with start-feature, which can call this as its implementation step.
  • Companion abs PR: feat/document-feature-capture-skill on absmartly/abs.

Companion PR: absmartly/abs#4624 — the document-feature-capture skill this one delegates to.

Summary by CodeRabbit

  • Documentation
    • Added guidance for creating product documentation pages for features.
    • Documented Docusaurus page structure, images, navigation, links, anchors, admonitions and tables.
    • Added a validation checklist covering page rendering, links, images and cleanup steps.

Orchestrator skill that turns an ABsmartly feature into Docusaurus Product
Documentation pages: research (via the abs document-feature-capture skill) →
confirm framing → write pages matching site conventions → screenshots →
validate. Captures the Docusaurus conventions, the <Image> component usage,
anchor/link rules, and the dev-server validation loop (incl. the known
cytoscape/mermaid build quirk to ignore). Content + validation only; leaves
worktree/JIRA/PR to start-feature.
@netlify

netlify Bot commented Jul 20, 2026

Copy link
Copy Markdown

Deploy Preview for absmartly-docs ready!

Name Link
🔨 Latest commit ee551bb
🔍 Latest deploy log https://app.netlify.com/projects/absmartly-docs/deploys/6a5e49846fbec9000882c452
😎 Deploy Preview https://deploy-preview-281--absmartly-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Adds the write-feature-docs skill and two reference documents. The skill defines a five-phase workflow for researching features, confirming framing, writing Docusaurus pages, capturing screenshots, and validating results. The conventions reference documents frontmatter, images, navigation, admonitions, links, anchors, tables, and content structure. The validation reference documents dev-server checks, MDX and link validation, image loading checks, known build behaviour, and cleanup.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: bmsilva, calthejuggler, marcio-absmartly

Poem

I hopped through docs with a tidy pen,
From research trails to pages again.
Screenshots tucked where they should be,
Anchors checked beneath the tree.
The rabbit nods: “All clear to see!”

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding the write-feature-docs skill for ABsmartly feature documentation.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/write-feature-docs-skill

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (1)
.claude/skills/write-feature-docs/references/validation.md (1)

9-12: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Make the dependency symlink example portable.

The hardcoded /Users/<you>/... path fails outside macOS and requires manual editing. Prefer $HOME/git_tree/docs/node_modules, or explicitly mark the path as a platform-specific placeholder.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/write-feature-docs/references/validation.md around lines 9 -
12, Update the dependency symlink example in the validation documentation to use
the portable $HOME/git_tree/docs/node_modules path instead of the hardcoded
/Users/<you>/ path, while preserving the command’s worktree context and
behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/skills/write-feature-docs/references/validation.md:
- Around line 40-55: Update the validation guidance around the Playwright checks
to enumerate every changed MDX route and run the anchor, link, and image
validations against each route rather than a single <area>/<page>. Ensure the
procedure reports failures per page and only passes when all changed pages have
valid anchors, links, and loaded images.
- Around line 30-31: Update the “Pages compile” validation procedure to avoid
treating HTTP 200 responses as proof of successful compilation. Require checking
dev-server error overlays and logs, failing on unrecognized MDX or compile
errors, while whitelisting only the documented Cytoscape/Mermaid issue; apply
the same criteria to the related validation steps around the referenced section.
- Around line 20-25: Update the readiness-check loop in the development server
validation procedure to track whether a 200 response was received; after all 15
attempts fail, exit with status 1 so subsequent validation does not run without
a ready server.

In @.claude/skills/write-feature-docs/SKILL.md:
- Around line 25-27: Add a suitable language identifier, preferably text, to the
fenced workflow diagram in .claude/skills/write-feature-docs/SKILL.md lines
25-27 and the production-build error fence in
.claude/skills/write-feature-docs/references/validation.md lines 63-65; no other
content changes are needed.

---

Nitpick comments:
In @.claude/skills/write-feature-docs/references/validation.md:
- Around line 9-12: Update the dependency symlink example in the validation
documentation to use the portable $HOME/git_tree/docs/node_modules path instead
of the hardcoded /Users/<you>/ path, while preserving the command’s worktree
context and behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b7dabfc3-a14c-4593-8905-a7ec210096f9

📥 Commits

Reviewing files that changed from the base of the PR and between 1c5c1ee and ee551bb.

📒 Files selected for processing (3)
  • .claude/skills/write-feature-docs/SKILL.md
  • .claude/skills/write-feature-docs/references/docusaurus-conventions.md
  • .claude/skills/write-feature-docs/references/validation.md

Comment on lines +20 to +25
yarn start --port 3111 --no-open > /tmp/docs-dev.log 2>&1 &
# wait for readiness:
for i in $(seq 1 15); do
curl -s -o /dev/null -w "%{http_code}\n" http://localhost:3111/docs/web-console-docs/<area>/<page> | grep -q 200 && { echo READY; break; }
sleep 5
done

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Fail when the dev server never becomes ready.

After 15 unsuccessful attempts, the loop exits successfully and the procedure continues without a running server. Track readiness and exit 1 after the timeout so validation cannot proceed against an unavailable server.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/write-feature-docs/references/validation.md around lines 20 -
25, Update the readiness-check loop in the development server validation
procedure to track whether a 200 response was received; after all 15 attempts
fail, exit with status 1 so subsequent validation does not run without a ready
server.

Comment on lines +30 to +31
### 1. Pages compile (no MDX errors)
If an `.mdx` page has a syntax error, the dev server logs it and the page won't load. A clean start + HTTP 200 on your pages = compiled.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not treat HTTP 200 as proof of compilation.

The procedure itself notes that the dev server can show a red error overlay while still serving pages, so a 200 response can coexist with MDX or compile errors. Fail on unrecognised error overlays/log entries and whitelist only the documented cytoscape/mermaid issue.

Also applies to: 59-71

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/write-feature-docs/references/validation.md around lines 30 -
31, Update the “Pages compile” validation procedure to avoid treating HTTP 200
responses as proof of successful compilation. Require checking dev-server error
overlays and logs, failing on unrecognized MDX or compile errors, while
whitelisting only the documented Cytoscape/Mermaid issue; apply the same
criteria to the related validation steps around the referenced section.

Comment on lines +40 to +55
To positively confirm an anchor exists (client-rendered, so use a JS-capable check rather than curl+grep):

```js
// via a standalone Playwright script (see the abs skill's app-bring-up.md for resolving playwright)
await page.goto('http://localhost:3111/docs/web-console-docs/<area>/<page>', { waitUntil: 'networkidle' });
const ok = await page.evaluate(() => !!document.getElementById('<expected-anchor-slug>'));
```

### 3. Images load
Confirm every `<Image>` resolves (no missing file / `naturalWidth === 0`):

```js
const broken = await page.evaluate(() =>
Array.from(document.querySelectorAll('article img')).filter(i => i.complete && i.naturalWidth === 0).length);
console.log('broken images:', broken); // expect 0
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Validate every changed page, not one route.

The examples check only one <area>/<page>, one expected anchor, and images in the currently loaded document. A feature spanning multiple pages can therefore pass while another page has broken links, anchors, or images. Enumerate all changed MDX routes and validate each page.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/write-feature-docs/references/validation.md around lines 40 -
55, Update the validation guidance around the Playwright checks to enumerate
every changed MDX route and run the anchor, link, and image validations against
each route rather than a single <area>/<page>. Ensure the procedure reports
failures per page and only passes when all changed pages have valid anchors,
links, and loaded images.

Comment on lines +25 to +27
```
Research → Confirm framing → Write pages → Screenshots → Validate
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add languages to both fenced blocks.

  • .claude/skills/write-feature-docs/SKILL.md#L25-L27: add text (or another suitable language) to the workflow diagram fence.
  • .claude/skills/write-feature-docs/references/validation.md#L63-L65: add text to the production-build error fence.
🧰 Tools
🪛 markdownlint-cli2 (0.23.0)

[warning] 25-25: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

📍 Affects 2 files
  • .claude/skills/write-feature-docs/SKILL.md#L25-L27 (this comment)
  • .claude/skills/write-feature-docs/references/validation.md#L63-L65
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/write-feature-docs/SKILL.md around lines 25 - 27, Add a
suitable language identifier, preferably text, to the fenced workflow diagram in
.claude/skills/write-feature-docs/SKILL.md lines 25-27 and the production-build
error fence in .claude/skills/write-feature-docs/references/validation.md lines
63-65; no other content changes are needed.

Source: Linters/SAST tools

@joalves
joalves merged commit 5f77e19 into master Jul 20, 2026
6 checks passed
@joalves
joalves deleted the feat/write-feature-docs-skill branch July 20, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant